home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / cmds / gdb.new / gdb-3.98 / gdb / gdb.info-5 < prev    next >
Encoding:
Text File  |  1991-08-01  |  44.2 KB  |  1,040 lines

  1. Info file gdb.info, produced by Makeinfo, -*- Text -*- from input
  2. file gdb-all.texinfo.
  3.  
  4.    This file documents the GNU debugger GDB.
  5.  
  6.    Copyright (C) 1988, 1989, 1990, 1991 Free Software Foundation, Inc.
  7.  
  8.    Permission is granted to make and distribute verbatim copies of
  9. this
  10. manual provided the copyright notice and this permission notice are
  11. preserved on all copies.
  12.  
  13.    Permission is granted to copy and distribute modified versions of
  14. this
  15. manual under the conditions for verbatim copying, provided also that
  16. the section entitled "GNU General Public License" is included
  17. exactly as in the original, and provided that the entire resulting
  18. derived work is distributed under the terms of a permission notice
  19. identical to this one.
  20.  
  21.    Permission is granted to copy and distribute translations of this
  22. manual into another language, under the above conditions for
  23. modified versions, except that the section entitled "GNU General
  24. Public License" may be included in a translation approved by the
  25. Free Software Foundation instead of in the original English.
  26.  
  27. 
  28. File: gdb.info,  Node: Emacs,  Next: GDB Bugs,  Prev: Sequences,  Up: Top
  29.  
  30. Using GDB under GNU Emacs
  31. *************************
  32.  
  33.    A special interface allows you to use GNU Emacs to view (and edit)
  34. the source files for the program you are debugging with GDB.
  35.  
  36.    To use this interface, use the command `M-x gdb' in Emacs.  Give
  37. the executable file you want to debug as an argument.  This command
  38. starts GDB as a subprocess of Emacs, with input and output through a
  39. newly created Emacs buffer.
  40.  
  41.    Using GDB under Emacs is just like using GDB normally except for
  42. two things:
  43.  
  44.    * All "terminal" input and output goes through the Emacs buffer.
  45.  
  46.    This applies both to GDB commands and their output, and to the
  47. input and output done by the program you are debugging.
  48.  
  49.    This is useful because it means that you can copy the text of
  50. previous commands and input them again; you can even use parts of
  51. the
  52. output in this way.
  53.  
  54.    All the facilities of Emacs' Shell mode are available for
  55. interacting with your program.  In particular, you can send signals
  56. the usual way--for example, `C-c C-c' for an interrupt, `C-c C-z'
  57. for a stop.
  58.  
  59.    * GDB displays source code through Emacs.
  60.  
  61.    Each time GDB displays a stack frame, Emacs automatically finds
  62. the source file for that frame and puts an arrow (`=>') at the left
  63. margin of the current line.  Emacs uses a separate buffer for source
  64. display, and splits the window to show both your GDB session and the
  65. source.
  66.  
  67.    Explicit GDB `list' or search commands still produce output as
  68. usual, but you probably will have no reason to use them.
  69.  
  70.      *Warning:* If the directory where your program resides is not
  71.      your current directory, it can be easy to confuse Emacs about
  72.      the location of the source files, in which case the auxiliary
  73.      display buffer will not appear to show your source.  GDB can
  74.      find programs by searching your environment's `PATH' variable,
  75.      so the GDB input and output session will proceed normally; but
  76.      Emacs doesn't get enough information back from GDB to locate
  77.      the source files in this situation.  To avoid this problem,
  78.      either start GDB mode from the directory where your program
  79.      resides, or specify a full path name when prompted for the `M-x
  80.      gdb' argument.
  81.  
  82.      A similar confusion can result if you use the GDB `file' command
  83.      to switch to debugging a program in some other location, from
  84.      an existing GDB buffer in Emacs.
  85.  
  86.    By default, `M-x gdb' calls the program called `gdb'.  If you need
  87. to call GDB by a different name (for example, if you keep several
  88. configurations around, with different names) you can set the Emacs
  89. variable `gdb-command-name'; for example,
  90.  
  91.      (setq gdb-command-name "mygdb")
  92.  
  93. (preceded by `ESC ESC', or typed in the `*scratch*' buffer, or in
  94. your `.emacs' file) will make Emacs call the program named "`mygdb'"
  95. instead.
  96.  
  97.    In the GDB I/O buffer, you can use these special Emacs commands in
  98. addition to the standard Shell mode commands:
  99.  
  100. `C-h m'
  101.      Describe the features of Emacs' GDB Mode.
  102.  
  103. `M-s'
  104.      Execute to another source line, like the GDB `step' command;
  105.      also update the display window to show the current file and
  106.      location.
  107.  
  108. `M-n'
  109.      Execute to next source line in this function, skipping all
  110.      function calls, like the GDB `next' command.  Then update the
  111.      display window to show the current file and location.
  112.  
  113. `M-i'
  114.      Execute one instruction, like the GDB `stepi' command; update
  115.      display window accordingly.
  116.  
  117. `M-x gdb-nexti'
  118.      Execute to next instruction, using the GDB `nexti' command;
  119.      update display window accordingly.
  120.  
  121. `C-c C-f'
  122.      Execute until exit from the selected stack frame, like the GDB
  123.      `finish' command.
  124.  
  125. `M-c'
  126.      Continue execution of the program, like the GDB `continue'
  127.      command.  *Warning:* In Emacs v19, this command is `C-c C-p'.
  128.  
  129. `M-u'
  130.      Go up the number of frames indicated by the numeric argument
  131.      (*note Numeric Arguments: (emacs)Arguments.), like the GDB `up'
  132.      command.  *Warning:* In Emacs v19, this command is `C-c C-u'.
  133.  
  134. `M-d'
  135.      Go down the number of frames indicated by the numeric argument,
  136.      like the GDB `down' command.  *Warning:* In Emacs v19, this
  137.      command is `C-c C-d'.
  138.  
  139. `C-x &'
  140.      Read the number where the cursor is positioned, and insert it at
  141.      the end of the GDB I/O buffer.  For example, if you wish to
  142.      disassemble code around an address that was displayed earlier,
  143.      type `disassemble'; then move the cursor to the address
  144.      display, and pick up the argument for `disassemble' by typing
  145.      `C-x &'.
  146.  
  147.      You can customize this further on the fly by defining elements
  148.      of the list `gdb-print-command'; once it is defined, you can
  149.      format or otherwise process numbers picked up by `C-x &' before
  150.      they are inserted.  A numeric argument to `C-x &' will both
  151.      flag that you wish special formatting, and act as an index to
  152.      pick an element of the list.  If the list element is a string,
  153.      the number to be inserted is formatted using the Emacs function
  154.      `format'; otherwise the number is passed as an argument to the
  155.      corresponding list element.
  156.  
  157.    In any source file, the Emacs command `C-x SPC' (`gdb-break')
  158. tells GDB to set a breakpoint on the source line point is on.
  159.  
  160.    If you accidentally delete the source-display buffer, an easy way
  161. to get it back is to type the command `f' in the GDB buffer, to
  162. request a frame display; when you run under Emacs, this will
  163. recreate the source buffer if necessary to show you the context of
  164. the current frame.
  165.  
  166.    The source files displayed in Emacs are in ordinary Emacs buffers
  167. which are visiting the source files in the usual way.  You can edit
  168. the files with these buffers if you wish; but keep in mind that GDB
  169. communicates with Emacs in terms of line numbers.  If you add or
  170. delete lines from the text, the line numbers that GDB knows will
  171. cease to correspond properly to the code.
  172.  
  173. 
  174. File: gdb.info,  Node: GDB Bugs,  Next: Renamed Commands,  Prev: Emacs,  Up: Top
  175.  
  176. Reporting Bugs in GDB
  177. *********************
  178.  
  179.    Your bug reports play an essential role in making GDB reliable.
  180.  
  181.    Reporting a bug may help you by bringing a solution to your
  182. problem, or it may not.  But in any case the principal function of a
  183. bug report is to help the entire community by making the next
  184. version of GDB work better.  Bug reports are your contribution to
  185. the maintenance of GDB.
  186.  
  187.    In order for a bug report to serve its purpose, you must include
  188. the information that enables us to fix the bug.
  189.  
  190. * Menu:
  191.  
  192. * Bug Criteria::        Have You Found a Bug?
  193. * Bug Reporting::        How to Report Bugs
  194.  
  195. 
  196. File: gdb.info,  Node: Bug Criteria,  Next: Bug Reporting,  Prev: GDB Bugs,  Up: GDB Bugs
  197.  
  198. Have You Found a Bug?
  199. =====================
  200.  
  201.    If you are not sure whether you have found a bug, here are some
  202. guidelines:
  203.  
  204.    * If the debugger gets a fatal signal, for any input whatever,
  205.      that is a GDB bug.  Reliable debuggers never crash.
  206.  
  207.    * If GDB produces an error message for valid input, that is a bug.
  208.  
  209.    * If GDB does not produce an error message for invalid input, that
  210.      is a bug.  However, you should note that your idea of "invalid
  211.      input" might be our idea of "an extension" or "support for
  212.      traditional practice".
  213.  
  214.    * If you are an experienced user of debugging tools, your
  215.      suggestions for improvement of GDB are welcome in any case.
  216.  
  217. 
  218. File: gdb.info,  Node: Bug Reporting,  Prev: Bug Criteria,  Up: GDB Bugs
  219.  
  220. How to Report Bugs
  221. ==================
  222.  
  223.    A number of companies and individuals offer support for GNU
  224. products.  If you obtained GDB from a support organization, we
  225. recommend you contact that organization first.
  226.  
  227.    Contact information for many support companies and individuals is
  228. available in the file `etc/SERVICE' in the GNU Emacs distribution.
  229.  
  230.    In any event, we also recommend that you send bug reports for GDB
  231. to one of these addresses:
  232.  
  233.      bug-gdb@prep.ai.mit.edu
  234.      {ucbvax|mit-eddie|uunet}!prep.ai.mit.edu!bug-gdb
  235.  
  236.    *Do not send bug reports to `info-gdb', or to `help-gdb', or to
  237. any newsgroups.* Most users of GDB do not want to receive bug
  238. reports.  Those that do, have arranged to receive `bug-gdb'.
  239.  
  240.    The mailing list `bug-gdb' has a newsgroup `gnu.gdb.bug' which
  241. serves as a repeater.  The mailing list and the newsgroup carry
  242. exactly the same messages.  Often people think of posting bug
  243. reports to the newsgroup instead of mailing them.  This appears to
  244. work, but it has one problem which can be crucial: a newsgroup
  245. posting often lacks a mail path back to the sender.  Thus, if we
  246. need to ask for more information, we may be unable to reach you. 
  247. For this reason, it is better to send bug reports to the mailing list.
  248.  
  249.    As a last resort, send bug reports on paper to:
  250.  
  251.      GNU Debugger Bugs
  252.      Free Software Foundation
  253.      545 Tech Square
  254.      Cambridge, MA 02139
  255.  
  256.    The fundamental principle of reporting bugs usefully is this:
  257. *report all the facts*.  If you are not sure whether to state a fact
  258. or leave it out, state it!
  259.  
  260.    Often people omit facts because they think they know what causes
  261. the problem and assume that some details don't matter.  Thus, you
  262. might assume that the name of the variable you use in an example
  263. does not matter.  Well, probably it doesn't, but one cannot be sure.
  264. Perhaps the bug is a stray memory reference which happens to fetch
  265. from the location where that name is stored in memory; perhaps, if
  266. the name were different, the contents of that location would fool
  267. the debugger into doing the right thing despite the bug.  Play it
  268. safe and give a specific, complete example.  That is the easiest
  269. thing for you to do, and the most helpful.
  270.  
  271.    Keep in mind that the purpose of a bug report is to enable us to
  272. fix the bug if it is new to us.  It isn't as important what happens
  273. if the bug is already known.  Therefore, always write your bug
  274. reports on the assumption that the bug has not been reported
  275. previously.
  276.  
  277.    Sometimes people give a few sketchy facts and ask, "Does this ring
  278. a bell?"  Those bug reports are useless, and we urge everyone to
  279. *refuse to respond to them* except to chide the sender to report
  280. bugs properly.
  281.  
  282.    To enable us to fix the bug, you should include all these things:
  283.  
  284.    * The version of GDB.  GDB announces it if you start with no
  285.      arguments; you can also print it at any time using `show
  286.      version'.
  287.  
  288.      Without this, we won't know whether there is any point in
  289.      looking for the bug in the current version of GDB.
  290.  
  291.    * A complete input script, and all necessary source files, that
  292.      will reproduce the bug.
  293.  
  294.    * What compiler (and its version) was used to compile GDB--e.g. 
  295.      "gcc-1.37.1".
  296.  
  297.    * The command arguments you gave the compiler to compile your
  298.      example and observe the bug.  For example, did you use `-O'? 
  299.      To
  300.      guarantee you won't omit something important, list them all.
  301.  
  302.      If we were to try to guess the arguments, we would probably
  303.      guess wrong and then we might not encounter the bug.
  304.  
  305.    * The type of machine you are using, and the operating system name
  306.      and version number.
  307.  
  308.    * A description of what behavior you observe that you believe is
  309.      incorrect.  For example, "It gets a fatal signal."
  310.  
  311.      Of course, if the bug is that GDB gets a fatal signal, then we
  312.      will certainly notice it.  But if the bug is incorrect output,
  313.      we might not notice unless it is glaringly wrong.  We are
  314.      human, after all.  You might as well not give us a chance to
  315.      make a mistake.
  316.  
  317.      Even if the problem you experience is a fatal signal, you should
  318.      still say so explicitly.  Suppose something strange is going
  319.      on, such as, your copy of GDB is out of synch, or you have
  320.      encountered a bug in the C library on your system.  (This has
  321.      happened!)  Your copy might crash and ours would not.  If you
  322.      told us to expect a crash, then when ours fails to crash, we
  323.      would know that the bug was not happening for us.  If you had
  324.      not told us to expect a crash, then we would not be able to
  325.      draw any conclusion from our observations.
  326.  
  327.    * If you wish to suggest changes to the GDB source, send us
  328.      context diffs.  If you even discuss something in the GDB
  329.      source, refer to it by context, not by line number.
  330.  
  331.      The line numbers in our development sources won't match those in
  332.      your sources.  Your line numbers would convey no useful
  333.      information to us.
  334.  
  335.    Here are some things that are not necessary:
  336.  
  337.    * A description of the envelope of the bug.
  338.  
  339.      Often people who encounter a bug spend a lot of time
  340.      investigating which changes to the input file will make the bug
  341.      go away and which changes will not affect it.
  342.  
  343.      This is often time consuming and not very useful, because the
  344.      way we will find the bug is by running a single example under
  345.      the debugger with breakpoints, not by pure deduction from a
  346.      series of examples.  We recommend that you save your time for
  347.      something else.
  348.  
  349.      Of course, if you can find a simpler example to report *instead*
  350.      of the original one, that is a convenience for us.  Errors in
  351.      the output will be easier to spot, running under the debugger
  352.      will take less time, etc.
  353.  
  354.      However, simplification is not vital; if you don't want to do
  355.      this, report the bug anyway and send us the entire test case
  356.      you used.
  357.  
  358.    * A patch for the bug.
  359.  
  360.      A patch for the bug does help us if it is a good one.  But don't
  361.      omit the necessary information, such as the test case, on the
  362.      assumption that a patch is all we need.  We might see problems
  363.      with your patch and decide to fix the problem another way, or
  364.      we might not understand it at all.
  365.  
  366.      Sometimes with a program as complicated as GDB it is very hard
  367.      to construct an example that will make the program follow a
  368.      certain path through the code.  If you don't send us the
  369.      example, we won't be able to construct one, so we won't be able
  370.      to verify that the bug is fixed.
  371.  
  372.      And if we can't understand what bug you are trying to fix, or
  373.      why your patch should be an improvement, we won't install it. 
  374.      A test case will help us to understand.
  375.  
  376.    * A guess about what the bug is or what it depends on.
  377.  
  378.      Such guesses are usually wrong.  Even we can't guess right about
  379.      such things without first using the debugger to find the facts.
  380.  
  381. 
  382. File: gdb.info,  Node: Renamed Commands,  Next: Installing GDB,  Prev: GDB Bugs,  Up: Top
  383.  
  384. Renamed Commands
  385. ****************
  386.  
  387.    The following commands were renamed in GDB 4.0, in order to make
  388. the command set as a whole more consistent and easier to use and
  389. remember:
  390.  
  391.      OLD COMMAND               NEW COMMAND
  392.      ---------------           -------------------------------
  393.      add-syms                  add-symbol-file
  394.      delete environment        unset environment
  395.      info convenience          show convenience
  396.      info copying              show copying
  397.      info directories          show directories     
  398.      info editing              show commands
  399.      info history              show values
  400.      info targets              help target
  401.      info values               show values
  402.      info version              show version
  403.      info warranty             show warranty
  404.      set/show addressprint     set/show print address
  405.      set/show array-max        set/show print elements
  406.      set/show arrayprint       set/show print array
  407.      set/show asm-demangle     set/show print asm-demangle
  408.      set/show caution          set/show confirm
  409.      set/show demangle         set/show print demangle
  410.      set/show history write    set/show history save
  411.      set/show prettyprint      set/show print pretty
  412.      set/show screen-height    set/show height
  413.      set/show screen-width     set/show width
  414.      set/show sevenbit-strings set/show print sevenbit-strings
  415.      set/show unionprint       set/show print union
  416.      set/show vtblprint        set/show print vtbl
  417.      
  418.      unset                     [No longer an alias for delete]
  419.  
  420. 
  421. File: gdb.info,  Node: Installing GDB,  Next: Copying,  Prev: Renamed Commands,  Up: Top
  422.  
  423. Installing GDB
  424. **************
  425.  
  426.    GDB is distributed with a `configure' script that automates the
  427. process of preparing GDB for installation; you can then use `make'
  428. to build the `gdb' program.
  429.  
  430.    The `configure' script that's specific to GDB is distributed in
  431. the main GDB source directory.  However, building GDB also requires
  432. several other directories of source common to multiple GNU programs.
  433. These directories (GNU libraries and includes) are distributed
  434. separately, but their `configure' scripts and `Makefile's are
  435. designed to work together.  To ensure that GDB's `Makefile' can find
  436. all the pieces, you should make a single overall directory to hold
  437. the directories of source for GNU libraries and includes, and you
  438. should install the GDB source directory there too.  In this
  439. Appendix, we refer to the directory of GNU source directories as
  440. GNUSRC.
  441.  
  442.    At a minimum, to build GDB you need the directories
  443.  
  444. `GNUSRC/gdb'
  445.      the source specific to GDB itself
  446.  
  447. `GNUSRC/bfd'
  448.      source for the Binary File Descriptor Library
  449.  
  450. `GNUSRC/include'
  451.      GNU include files
  452.  
  453. `GNUSRC/libiberty'
  454.      source for the `-liberty' free software library
  455.  
  456. `GNUSRC/readline'
  457.      source for the GNU command-line interface
  458.  
  459. Each of these directories has its own `configure' script.  GNUSRC has
  460. an overall `configure' script, which is distributed with the GNU
  461. libraries and includes.
  462.  
  463.    `configure' is designed to be called recursively, so it is most
  464. convenient to run `configure' from the GNUSRC directory.  The
  465. simplest way to configure and build GDB is the following:
  466.  
  467.      cd GNUSRC
  468.      ./configure HOST
  469.      make
  470.  
  471. where HOST is something like `sun4' or `vax', that identifies the
  472. platform where GDB will run.  This builds the three libraries `bfd',
  473. `readline', and `libiberty', then `gdb' itself.  The configured
  474. source files, and the binaries, are left in the corresponding source
  475. directories.
  476.  
  477.    You can install `gdb' anywhere; it has no hardwired paths. 
  478. However, you should make sure that the shell on your path (named by
  479. the `SHELL' environment variable) is publicly readable; some systems
  480. refuse to let GDB debug child processes whose programs are not
  481. readable, and GDB uses the shell to start your program.
  482.  
  483. * Menu:
  484.  
  485. * Subdirectories::        Configuration subdirectories
  486. * configure Options::        Summary of options for configure
  487. * Formatting Manual::        How to format and print this manual
  488.  
  489. 
  490. File: gdb.info,  Node: Subdirectories,  Next: configure Options,  Prev: Installing GDB,  Up: Installing GDB
  491.  
  492. Configuration Subdirectories
  493. ============================
  494.  
  495.    If you build GDB for several host or target machines, and if your
  496. `make' program handles the `VPATH' feature (GNU `make' does), it is
  497. most convenient instead to build the different GDB configurations in
  498. subdirectories (separate from the source).  `configure' does this
  499. for you when you simultaneously specify several configurations; but
  500. it's a good habit even for a single configuration.  You can specify
  501. the use of subdirectories using the `+forcesubdirs' option
  502. (abbreviated `+f').  For example, you can build GDB on a Sun 4 as
  503. follows:
  504.  
  505.      cd GNUSRC
  506.      ./configure +f sun4
  507.      cd Host-sun4/Target-sun4
  508.      make
  509.  
  510.    When `configure' uses subdirectories to build programs or
  511. libraries, it creates nested directories `Host-HOST/Target-MACHINE'.
  512. This is because GDB can be configured for cross-compiling: GDB can
  513. run on one machine (the host) while debugging programs that run on
  514. another machine (the target).  You specify cross-debugging targets
  515. by giving the `+target=MACHINE' option to `configure'.  Specifying
  516. only hosts still gives you two levels of subdirectory for each host,
  517. with the same machine-name suffix on both.  On the other hand,
  518. whenever you specify both hosts and targets on the same command
  519. line, `configure' creates all combinations of the hosts and targets
  520. you
  521. list.
  522.  
  523.    When you run `make' to build a program or library, you must run it
  524. in a configured directory.  If you made a single configuration,
  525. without subdirectories, run `make' in the source directory.  If you
  526. have `Host-HOST/Target-MACHINE' subdirectories, run `make' in those
  527. subdirectories.
  528.  
  529.    Each `configure' and `Makefile' under each source directory runs
  530. recursively, so that typing `make' in GNUSRC (or in a
  531. `GNUSRC/Host-HOST/Target-MACHINE' subdirectory) builds all the
  532. required libraries, then GDB.
  533.  
  534.    If you run `configure' from a directory (such as GNUSRC) that
  535. contains source directories for multiple libraries or programs,
  536. `configure' creates the `Host-HOST/Target-MACHINE' subdirectories in
  537. each library or program's source directory.  For example, typing:
  538.  
  539.      cd GNUSRC
  540.      configure sun4 +target=vx960
  541.  
  542. creates the following directories:
  543.  
  544.      GNUSRC/Host-sun4/Target-vx960
  545.      GNUSRC/bfd/Host-sun4/Target-vx960
  546.      GNUSRC/gdb/Host-sun4/Target-vx960
  547.      GNUSRC/libiberty/Host-sun4/Target-vx960
  548.      GNUSRC/readline/Host-sun4/Target-vx960
  549.  
  550. The `Makefile' in `GNUSRC/Host-sun4/Target-vx960' will `cd' to the
  551. appropriate lower-level directories (such as
  552. `GNUSRC/bfd/Host-sun4/Target-vx960'), building each in turn.
  553.  
  554.    When you have multiple hosts or targets configured, you can run
  555. `make' on them in parallel (for example, if they are NFS-mounted on
  556. each of the hosts); they will not interfere with each other.
  557.  
  558. 
  559. File: gdb.info,  Node: configure Options,  Next: Formatting Manual,  Prev: Subdirectories,  Up: Installing GDB
  560.  
  561. `configure' Options
  562. ===================
  563.  
  564.    Here is a summary of all the `configure' options and arguments
  565. that you might use for building GDB:
  566.  
  567.      configure [+destdir=DIR] [+forcesubdirs] [+norecur] [+rm]
  568.                [+target=MACHINE...] HOST...
  569.  
  570. You may introduce options with the character `-' rather than `+' if
  571. you prefer; but options introduced with `+' may be truncated.
  572.  
  573. `+destdir=DIR'
  574.      DIR is an installation directory *path prefix*.  After you
  575.      configure with this option, `make install' will install GDB as
  576.      `DIR/bin/gdb', and the libraries in `DIR/lib'.  If you specify
  577.      `+destdir=/usr/local', for example, `make install' creates
  578.      `/usr/local/bin/gdb'.
  579.  
  580. `+forcesubdirs'
  581.      Write configuration specific files in subdirectories of the form
  582.  
  583.           Host-MACHINE/Target-MACHINE
  584.  
  585.      (and configure the `Makefile' to write binaries there too). 
  586.      Without this option, if you specify only one configuration for
  587.      GDB, `configure' will use the same directory for source,
  588.      configured files, and binaries.  This option is used
  589.      automatically if you specify more than one HOST or more than
  590.      one `+target=MACHINE' option on the `configure' command line.
  591.  
  592. `+norecur'
  593.      Configure only the directory where `configure' is executed; do
  594.      not propagate configuration to subdirectories.
  595.  
  596. `+rm'
  597.      Remove the configuration specified by other arguments.
  598.  
  599. `+target=MACHINE ...'
  600.      Configure GDB for cross-debugging programs running on each
  601.      specified MACHINE.  You may specify as many `+target' options
  602.      as you wish.  To see a list of available targets, execute `ls
  603.      tconfig' in the GDB source directory.  Without this option, GDB
  604.      is configured to debug programs that run on the same machine
  605.      (HOST) as GDB itself.
  606.  
  607. `HOST ...'
  608.      Configure GDB to run on each specified HOST.  You may specify as
  609.      many host names as you wish.  To see a list of available hosts,
  610.      execute `ls xconfig' in the GDB source directory.
  611.  
  612. `configure' accepts other options, for compatibility with configuring
  613. other GNU tools recursively; but these are the only options that
  614. affect GDB or its supporting libraries.
  615.  
  616. 
  617. File: gdb.info,  Node: Formatting Manual,  Prev: configure Options,  Up: Installing GDB
  618.  
  619. Formatting this Manual
  620. ======================
  621.  
  622.    To format the GDB manual as an Info file, you need the GNU
  623. `makeinfo' program.  Once you have it, you can type
  624.  
  625.      cd GNUSRC/gdb
  626.      make gdb.info
  627.  
  628. to make the Info file.
  629.  
  630.    If you want to format and print copies of this manual, you need
  631. several things:
  632.  
  633.    * TeX, the public domain typesetting program written by Donald
  634.      Knuth, must be installed on your system and available through
  635.      your execution path.
  636.  
  637.    * `GNUSRC/texinfo': TeX macros defining the GNU Documentation
  638.      Format.
  639.  
  640.    * *A DVI output program.*  TeX doesn't actually make marks on
  641.      paper; it produces output files called DVI files.  If your
  642.      system has TeX installed, chances are it has a program for
  643.      printing out these files; one popular example is `dvips', which
  644.      can print DVI files on PostScript printers.
  645.  
  646. Once you have these things, you can type
  647.  
  648.      cd GNUSRC/gdb
  649.      make gdb.dvi
  650.  
  651. to format the text of this manual, and print it with the usual output
  652. method for TeX DVI files at your site.
  653.  
  654. 
  655. File: gdb.info,  Node: Copying,  Next: Index,  Prev: Installing GDB,  Up: Top
  656.  
  657. GNU GENERAL PUBLIC LICENSE
  658. **************************
  659.  
  660.                              Version 2, June 1991
  661.  
  662.      Copyright (C) 1989, 1991 Free Software Foundation, Inc.
  663.      675 Mass Ave, Cambridge, MA 02139, USA
  664.      
  665.      Everyone is permitted to copy and distribute verbatim copies
  666.      of this license document, but changing it is not allowed.
  667.  
  668. Preamble
  669. ========
  670.  
  671.    The licenses for most software are designed to take away your
  672. freedom to share and change it.  By contrast, the GNU General Public
  673. License is intended to guarantee your freedom to share and change
  674. free software--to make sure the software is free for all its users. 
  675. This General Public License applies to most of the Free Software
  676. Foundation's software and to any other program whose authors commit
  677. to using it.  (Some other Free Software Foundation software is
  678. covered by the GNU Library General Public License instead.)  You can
  679. apply it to your programs, too.
  680.  
  681.    When we speak of free software, we are referring to freedom, not
  682. price.  Our General Public Licenses are designed to make sure that
  683. you have the freedom to distribute copies of free software (and
  684. charge for this service if you wish), that you receive source code
  685. or can get it if you want it, that you can change the software or
  686. use pieces of it in new free programs; and that you know you can do
  687. these things.
  688.  
  689.    To protect your rights, we need to make restrictions that forbid
  690. anyone to deny you these rights or to ask you to surrender the rights.
  691. These restrictions translate to certain responsibilities for you if
  692. you distribute copies of the software, or if you modify it.
  693.  
  694.    For example, if you distribute copies of such a program, whether
  695. gratis or for a fee, you must give the recipients all the rights
  696. that
  697. you have.  You must make sure that they, too, receive or can get the
  698. source code.  And you must show them these terms so they know their
  699. rights.
  700.  
  701.    We protect your rights with two steps: (1) copyright the software,
  702. and (2) offer you this license which gives you legal permission to
  703. copy, distribute and/or modify the software.
  704.  
  705.    Also, for each author's protection and ours, we want to make
  706. certain that everyone understands that there is no warranty for this
  707. free software.  If the software is modified by someone else and
  708. passed on, we want its recipients to know that what they have is not
  709. the original, so that any problems introduced by others will not
  710. reflect on the original authors' reputations.
  711.  
  712.    Finally, any free program is threatened constantly by software
  713. patents.  We wish to avoid the danger that redistributors of a free
  714. program will individually obtain patent licenses, in effect making
  715. the program proprietary.  To prevent this, we have made it clear
  716. that any patent must be licensed for everyone's free use or not
  717. licensed at all.
  718.  
  719.    The precise terms and conditions for copying, distribution and
  720. modification follow.
  721.  
  722.        TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
  723.  
  724.   1. This License applies to any program or other work which contains
  725.      a notice placed by the copyright holder saying it may be
  726.      distributed under the terms of this General Public License. 
  727.      The "Program", below, refers to any such program or work, and a
  728.      "work based on the Program" means either the Program or any
  729.      derivative work under copyright law: that is to say, a work
  730.      containing the Program or a portion of it, either verbatim or
  731.      with modifications and/or translated into another language. 
  732.      (Hereinafter, translation is included without limitation in the
  733.      term "modification".)  Each licensee is addressed as "you".
  734.  
  735.         Activities other than copying, distribution and modification
  736.      are not covered by this License; they are outside its scope. 
  737.      The act of running the Program is not restricted, and the
  738.      output from the Program is covered only if its contents
  739.      constitute a work based on the Program (independent of having
  740.      been made by running the Program).  Whether that is true
  741.      depends on what the Program does.
  742.  
  743.   2. You may copy and distribute verbatim copies of the Program's
  744.      source code as you receive it, in any medium, provided that you
  745.      conspicuously and appropriately publish on each copy an
  746.      appropriate copyright notice and disclaimer of warranty; keep
  747.      intact all the notices that refer to this License and to the
  748.      absence of any warranty; and give any other recipients of the
  749.      Program a copy of this License along with the Program.
  750.  
  751.         You may charge a fee for the physical act of transferring a
  752.      copy, and you may at your option offer warranty protection in
  753.      exchange for a fee.
  754.  
  755.   3. You may modify your copy or copies of the Program or any portion
  756.      of it, thus forming a work based on the Program, and copy and
  757.      distribute such modifications or work under the terms of
  758.      Section 1 above, provided that you also meet all of these
  759.      conditions:
  760.  
  761.        a) You must cause the modified files to carry prominent
  762.           notices stating that you changed the files and the date of
  763.           any change.
  764.  
  765.        b) You must cause any work that you distribute or publish,
  766.           that in whole or in part contains or is derived from the
  767.           Program or any part thereof, to be licensed as a whole at
  768.           no charge to all third parties under the terms of this
  769.           License.
  770.  
  771.        c) If the modified program normally reads commands
  772.           interactively when run, you must cause it, when started
  773.           running for such interactive use in the most ordinary way,
  774.           to print or display an announcement including an
  775.           appropriate copyright notice and a notice that there is no
  776.           warranty (or else, saying that you provide a warranty) and
  777.           that users may redistribute the program under these
  778.           conditions, and telling the user how to view a copy of
  779.           this License.  (Exception: if the Program itself is
  780.           interactive but does not normally print such an
  781.           announcement, your work based on the Program is not
  782.           required to print an announcement.)
  783.  
  784.         These requirements apply to the modified work as a whole.  If
  785.      identifiable sections of that work are not derived from the
  786.      Program, and can be reasonably considered independent and
  787.      separate works in themselves, then this License, and its terms,
  788.      do not apply to those sections when you distribute them as
  789.      separate works.  But when you distribute the same sections as
  790.      part of a whole which is a work based on the Program, the
  791.      distribution of the whole must be on the terms of this License,
  792.      whose permissions for other licensees extend to the entire
  793.      whole, and thus to each and every part regardless of who wrote
  794.      it.
  795.  
  796.         Thus, it is not the intent of this section to claim rights or
  797.      contest your rights to work written entirely by you; rather,
  798.      the intent is to exercise the right to control the distribution
  799.      of derivative or collective works based on the Program.
  800.  
  801.         In addition, mere aggregation of another work not based on
  802.      the Program with the Program (or with a work based on the
  803.      Program) on a volume of a storage or distribution medium does
  804.      not bring the other work under the scope of this License.
  805.  
  806.   4. You may copy and distribute the Program (or a work based on it,
  807.      under Section 2) in object code or executable form under the
  808.      terms of Sections 1 and 2 above provided that you also do one
  809.      of the following:
  810.  
  811.        a) Accompany it with the complete corresponding
  812.           machine-readable source code, which must be distributed
  813.           under the terms of Sections 1 and 2 above on a medium
  814.          
  815.           customarily used for software interchange; or,
  816.  
  817.        b) Accompany it with a written offer, valid for at least three
  818.           years, to give any third party, for a charge no more than
  819.           your cost of physically performing source distribution, a
  820.           complete machine-readable copy of the corresponding source
  821.           code, to be distributed under the terms of Sections 1 and
  822.           2 above on a medium customarily used for software
  823.           interchange; or,
  824.  
  825.        c) Accompany it with the information you received as to the
  826.           offer to distribute corresponding source code.  (This
  827.           alternative is allowed only for noncommercial distribution
  828.           and only if you received the program in object code or
  829.           executable form with such an offer, in accord with
  830.           Subsection b above.)
  831.  
  832.         The source code for a work means the preferred form of the
  833.      work for making modifications to it.  For an executable work,
  834.      complete source code means all the source code for all modules
  835.      it contains, plus any associated interface definition files,
  836.      plus the scripts used to control compilation and installation
  837.      of the executable.  However, as a special exception, the source
  838.      code distributed need not include anything that is normally
  839.      distributed (in either source or binary form) with the major
  840.      components (compiler, kernel, and so on) of the operating
  841.      system on which the executable runs, unless that component
  842.      itself accompanies the executable.
  843.  
  844.         If distribution of executable or object code is made by
  845.      offering access to copy from a designated place, then offering
  846.      equivalent access to copy the source code from the same place
  847.      counts as distribution of the source code, even though third
  848.      parties are not compelled to copy the source along with the
  849.      object code.
  850.  
  851.   5. You may not copy, modify, sublicense, or distribute the Program
  852.      except as expressly provided under this License.  Any attempt
  853.      otherwise to copy, modify, sublicense or distribute the Program
  854.      is void, and will automatically terminate your rights under
  855.      this License.  However, parties who have received copies, or
  856.      rights, from you under this License will not have their
  857.      licenses terminated so long as such parties remain in full
  858.      compliance.
  859.  
  860.   6. You are not required to accept this License, since you have not
  861.      signed it.  However, nothing else grants you permission to
  862.      modify or distribute the Program or its derivative works. 
  863.      These actions are prohibited by law if you do not accept this
  864.      License.  Therefore, by modifying or distributing the Program
  865.      (or any work based on the Program), you indicate your
  866.      acceptance of this License to do so, and all its terms and
  867.      conditions for copying, distributing or modifying the Program
  868.      or works based on it.
  869.  
  870.   7. Each time you redistribute the Program (or any work based on the
  871.      Program), the recipient automatically receives a license from
  872.      the original licensor to copy, distribute or modify the Program
  873.      subject to these terms and conditions.  You may not impose any
  874.      further restrictions on the recipients' exercise of the rights
  875.      granted herein.  You are not responsible for enforcing
  876.      compliance by third parties to this License.
  877.  
  878.   8. If, as a consequence of a court judgment or allegation of patent
  879.      infringement or for any other reason (not limited to patent
  880.      issues), conditions are imposed on you (whether by court order,
  881.      agreement or otherwise) that contradict the conditions of this
  882.      License, they do not excuse you from the conditions of this
  883.      License.  If you cannot distribute so as to satisfy
  884.      simultaneously your obligations under this License and any
  885.      other pertinent obligations, then as a consequence you may not
  886.      distribute the Program at all.  For example, if a patent
  887.      license would not permit royalty-free redistribution of the
  888.      Program by all those who receive copies directly or indirectly
  889.      through you, then the only way you could satisfy both it and
  890.      this License would be to refrain entirely from distribution of
  891.      the Program.
  892.  
  893.         If any portion of this section is held invalid or
  894.      unenforceable under any particular circumstance, the balance of
  895.      the section is intended to apply and the section as a whole is
  896.      intended to apply in other circumstances.
  897.  
  898.         It is not the purpose of this section to induce you to
  899.      infringe any patents or other property right claims or to
  900.      contest validity of any such claims; this section has the sole
  901.      purpose of protecting the integrity of the free software
  902.      distribution system, which is implemented by public license
  903.      practices.  Many people have made generous contributions to the
  904.      wide range of software distributed through that system in
  905.      reliance on consistent application of that system; it is up to
  906.      the author/donor to decide if he or she is willing to
  907.      distribute software through any other system and a licensee
  908.      cannot impose that choice.
  909.  
  910.         This section is intended to make thoroughly clear what is
  911.      believed to be a consequence of the rest of this License.
  912.  
  913.   9. If the distribution and/or use of the Program is restricted in
  914.      certain countries either by patents or by copyrighted
  915.      interfaces, the original copyright holder who places the
  916.      Program under this License may add an explicit geographical
  917.      distribution limitation excluding those countries, so that
  918.      distribution is permitted only in or among countries not thus
  919.      excluded.  In such case, this License incorporates the
  920.      limitation as if written in the body of this License.
  921.  
  922.  10. The Free Software Foundation may publish revised and/or new
  923.      versions of the General Public License from time to time.  Such
  924.      new versions will be similar in spirit to the present version,
  925.      but may differ in detail to address new problems or concerns.
  926.  
  927.         Each version is given a distinguishing version number.  If
  928.      the Program specifies a version number of this License which
  929.      applies to it and "any later version", you have the option of
  930.      following the terms and conditions either of that version or of
  931.      any later version published by the Free Software Foundation. 
  932.      If the Program does not specify a version number of this
  933.      License, you may choose any version ever published by the Free
  934.      Software Foundation.
  935.  
  936.  11. If you wish to incorporate parts of the Program into other free
  937.      programs whose distribution conditions are different, write to
  938.      the author to ask for permission.  For software which is
  939.      copyrighted by the Free Software Foundation, write to the Free
  940.      Software Foundation; we sometimes make exceptions for this. 
  941.      Our decision will be guided by the two goals of preserving the
  942.      free status of all derivatives of our free software and of
  943.      promoting the sharing and reuse of software generally.
  944.  
  945.                                       NO WARRANTY
  946.  
  947.  12. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO
  948.      WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE
  949.      LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
  950.      HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS"
  951.      WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED,
  952.      INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  953.     
  954.      MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE
  955.      ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS
  956.      WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE
  957.      COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
  958.  
  959.  13. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
  960.      WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY
  961.      MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE
  962.      LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL,
  963.      INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR
  964.      INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS
  965.      OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED
  966.      BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE
  967.      WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY
  968.      HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
  969.  
  970.                          END OF TERMS AND CONDITIONS
  971.  
  972. Applying These Terms to Your New Programs
  973. =========================================
  974.  
  975.    If you develop a new program, and you want it to be of the
  976. greatest possible use to the public, the best way to achieve this is
  977. to make it free software which everyone can redistribute and change
  978. under these terms.
  979.  
  980.    To do so, attach the following notices to the program.  It is
  981. safest to attach them to the start of each source file to most
  982. effectively convey the exclusion of warranty; and each file should
  983. have
  984. at least the "copyright" line and a pointer to where the full notice
  985. is found.
  986.  
  987.      ONE LINE TO GIVE THE PROGRAM'S NAME AND A BRIEF IDEA OF WHAT IT DOES.
  988.      Copyright (C) 19YY  NAME OF AUTHOR
  989.      
  990.      This program is free software; you can redistribute it and/or modify
  991.      it under the terms of the GNU General Public License as published by
  992.      the Free Software Foundation; either version 2 of the License, or
  993.      (at your option) any later version.
  994.      
  995.      This program is distributed in the hope that it will be useful,
  996.      but WITHOUT ANY WARRANTY; without even the implied warranty of
  997.      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  998.      GNU General Public License for more details.
  999.      
  1000.      You should have received a copy of the GNU General Public License
  1001.      along with this program; if not, write to the Free Software
  1002.      Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  1003.  
  1004.    Also add information on how to contact you by electronic and paper
  1005. mail.
  1006.  
  1007.    If the program is interactive, make it output a short notice like
  1008. this when it starts in an interactive mode:
  1009.  
  1010.      Gnomovision version 69, Copyright (C) 19YY NAME OF AUTHOR
  1011.      Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
  1012.      This is free software, and you are welcome to redistribute it
  1013.      under certain conditions; type `show c' for details.
  1014.  
  1015.    The hypothetical commands `show w' and `show c' should show the
  1016. appropriate parts of the General Public License.  Of course, the
  1017. commands you use may be called something other than `show w' and
  1018. `show c'; they could even be mouse-clicks or menu items--whatever
  1019. suits
  1020. your
  1021. program.
  1022.  
  1023.    You should also get your employer (if you work as a programmer) or
  1024. your school, if any, to sign a "copyright disclaimer" for the
  1025. program, if necessary.  Here is a sample; alter the names:
  1026.  
  1027.      Yoyodyne, Inc., hereby disclaims all copyright interest in the program
  1028.      `Gnomovision' (which makes passes at compilers) written by James Hacker.
  1029.      
  1030.      SIGNATURE OF TY COON, 1 April 1989
  1031.      Ty Coon, President of Vice
  1032.  
  1033.    This General Public License does not permit incorporating your
  1034. program into proprietary programs.  If your program is a subroutine
  1035. library, you may consider it more useful to permit linking
  1036. proprietary applications with the library.  If this is what you want
  1037. to do, use the GNU Library General Public License instead of this
  1038. License.
  1039.  
  1040.